package com.curso.sesion7.contructores;

public class Son extends Fhather {
	
	private int age;
	
	private char gender;
	
	private static Byte unresponsabilitylevel;
	
	static {
		System.out.println("bloque de inializacion estatico");
		if(unresponsabilitylevel == null){
			unresponsabilitylevel =1;
			
		}
		
	}
	
	{
		System.out.println("bloque de inializacion");
		if (name == null){
			name ="defaul name";
		}
	}

	
	
	public Son(){
		super();

		System.out.println("constructor del Son");
	}


	/**
	 * @param age
	 * @param gender
	 * @param name
	 */
	public Son(int age, char gender, String name) {
		this();
		System.out.println("constructor2 del Son");
		this.age = age;
		this.gender = gender;
		this.name = name;
	}
	
	public Son(int age, String name, boolean isWoman) {
		this (age, isWoman ? 'F': 'M', name);
		
				System.out.println("constructor3 del Son");
		this.age = age;
		this.name = name;
	}


	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "Son [age=" + age + ", gender=" + gender + ", name=" + name
				+ "]";
	}

}
